package com.interview.evaluation.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.interview.common.domain.model.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 面试评估实体类
 *
 * @author zzw
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("interview_evaluation")
@Schema(description = "面试评估信息")
public class InterviewEvaluation extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "面试评估ID")
    private Long evaluationId;

    @Schema(description = "会话ID")
    private Long sessionId;

    @Schema(description = "面试者ID")
    private Long candidateId;

    @Schema(description = "AI评估结果JSON")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String aiEvaluationJson;

    @Schema(description = "AI评分")
    private BigDecimal aiScore;

    @Schema(description = "AI总结")
    private String aiSummary;

    @Schema(description = "人工评估人ID")
    private Long manualEvaluatorId;

    @Schema(description = "人工评分")
    private BigDecimal manualScore;

    @Schema(description = "人工总结")
    private String manualSummary;

    @Schema(description = "最终评分")
    private BigDecimal finalScore;

    @Schema(description = "评估状态（0未评估 1AI评估完成 2人工评估完成）", defaultValue = "0")
    private Character evaluationStatus;
}